yii.confirm   A
last analyzed

Complexity

Conditions 2
Paths 4

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 2
nc 4
nop 1
1
/*
2
 * This file is part of the Cjt Terabyte LLC [yii2-extension].
3
 *
4
 * (c) Cjt Terabyte LLC [yii2-extension] <http://github.com/cjtterabytesoft>.
5
 * For the full copyright and license information, please view the LICENSE.md.
6
 * file that was distributed with this source code.
7
 *
8
 * @link http://www.cjtterabyte.com.
9
 * @author Wilmer Arámbula <[email protected]>.
10
 * @copyright (c) 2015 Cjt Terabyte LLC.
11
 * @Extension: [yii2-adminlte-advanced].
12
 * @JS [Site - Custom].
13
 * @since 1.0
14
 */
15
16
(function ($) {
0 ignored issues
show
Unused Code introduced by
The parameter $ is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
17
    yii.confirm = function(message, ok, cancel) {
0 ignored issues
show
Bug introduced by
The variable yii seems to be never declared. If this is a global, consider adding a /** global: yii */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
18
        bootbox.confirm(message, function(result) {
0 ignored issues
show
Bug introduced by
The variable bootbox seems to be never declared. If this is a global, consider adding a /** global: bootbox */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
19
            if (result) { !ok || ok(); } else { !cancel || cancel(); }
20
        });
21
    }
22
})(window.jQuery);